package practice1.intro;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.core.io.FileSystemResource;

public class SpringIntroTest {
	public static void main(String args[]) throws UnsupportedEncodingException {

		String url = SpringIntroTest.class.getResource("").getPath();
		url = URLDecoder.decode(url, "UTF-8");
		ApplicationContext  ctx = new FileSystemXmlApplicationContext(url+"applicationContext.xml");
		Haha haha = (Haha) ctx.getBean("myHaha");
		haha.outputSomething();
	}

}
